package com.fcat.common.monitor.controller;

import com.alibaba.fastjson.JSONObject;
import com.fcat.base.server.model.Server;
import com.fcat.base.server.util.ShellCommand;
import com.fcat.springboot.mybatis.util.JsonUtil;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("server")
public class ServerController {
    private static final Logger logger = LoggerFactory.getLogger(ServerController.class);

    @ApiOperation(value = "", notes = "")
    @RequestMapping(value = "/serverInfo", method = RequestMethod.GET)
    public JSONObject sendContent() {

        ShellCommand shellCommand = new ShellCommand("项目一","localhost","123456");
        Server server = shellCommand.dealServer();
        return JsonUtil.getSuccessJsonObject( server);
    }
}